package cc.spider.web.datapipes;

import cc.spider.core.IDataPipe;
import cc.spider.model.FlowData;

import java.util.Map;
import java.util.Set;

public class ConsoleDataPipe implements IDataPipe {
    @Override
    public boolean write(FlowData flowData) {
        Map<String, Object> map = flowData.getFields();
        Set<String> keys = map.keySet();
        for (String key : keys) {
            System.out.println(String.format("'%s': '%s'", key, map.get(key)));
        }
        return true;
    }
}
